package work6;

public class Car {
    private String brand;
    private int price;
    private String model;
    //方法
    public void startEngine(){
        Engine engine = new Car().new Engine();
        engine.run();
    }

    //构造器
    public Car() {
    }
    public Car(String brand, int price, String model) {
        this.brand = brand;
        this.price = price;
        this.model = model;
    }

    class Engine{
        public void run(){
            System.out.println("启动发动机");
        }
    }
}
